home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / CBGRX103.ZIP / contrib / libgrx / src / int10.s < prev    next >
Text File  |  1993-12-06  |  2KB  |  86 lines

  1. /* This is file INT10.S */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15.     .file    "int10.s"
  16.     .data
  17.     .comm    _int10_bp_save_area,4
  18.     .text
  19.     .align  4
  20.     .def    _int10; .val    _int10; .scl    2;    .type    044;    .endef
  21.     .globl  _int10
  22.  
  23. _int10:
  24.     pushl    %ebp
  25.     movl    %esp,%ebp
  26.     movl    %ebp,_int10_bp_save_area
  27.     pushl    %ebx
  28.     pushl    %ecx
  29.     pushl    %edx
  30.     pushl    %esi
  31.     pushl    %edi
  32.  
  33.     movl    8(%ebp),%eax
  34.  
  35.     pushl    (%eax)        /* EAX */
  36.     pushl    4(%eax)        /* EBX */
  37.     pushl    8(%eax)        /* ECX */
  38.     pushl    12(%eax)    /* EDX */
  39.     pushl    16(%eax)    /* ESI */
  40.     pushl    20(%eax)    /* EDI */
  41.     pushl    24(%eax)    /* EBP */
  42. /*    pushl    28(%eax)*/    /* ES */
  43. /*    popw    %es*/
  44.     popl    %ebp
  45.     popl    %edi
  46.     popl    %esi
  47.     popl    %edx
  48.     popl    %ecx
  49.     popl    %ebx
  50.     popl    %eax
  51.     int    $0x10
  52.     pushl    %eax
  53.     pushl    %ebx
  54.     pushl    %ecx
  55.     pushl    %edx
  56.     pushl    %esi
  57.     pushl    %edi
  58.     pushl    %ebp
  59. /*    pushw    %es */
  60.     movl    _int10_bp_save_area,%ebp
  61.     movl    8(%ebp),%eax
  62.  
  63. /*    popl    28(%eax)*/    /* ES */
  64. /*    andl    $0xffff,28(%eax) */
  65.     popl    24(%eax)    /* EBP */
  66.     popl    20(%eax)    /* EDI */
  67.     popl    16(%eax)    /* ESI */
  68.     popl    12(%eax)    /* EDX */
  69.     popl    8(%eax)        /* ECX */
  70.     popl    4(%eax)        /* EBX */
  71.     popl    (%eax)        /* EAX */
  72.     mov    28(%eax),%eax    /* return flags */
  73.  
  74.     popl    %edi
  75.     popl    %esi
  76.     popl    %edx
  77.     popl    %ecx
  78.     popl    %ebx
  79.     leave
  80.     ret
  81.  
  82.     .align  4
  83.     .def    _int10; .val    .;    .scl    -1;    .endef
  84.     .data
  85.     .text
  86.